<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE HTML>
<html>
<head>
<c:set value="${pageContext.request.contextPath}" var="path"
	scope="page" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="renderer" content="webkit">
<link rel="stylesheet" type="text/css" href="${path}/css/ustyle.css">
<link rel="stylesheet" type="text/css" href="${path}/css/zui.min.css">
<script type="text/javascript" src="${path}/js/zui.min.js"></script>
<script type="text/javascript" src="${path}/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="${path}/js/musge.js"></script>


</HEAD>
<BODY>

	<script type="text/javascript" charset="utf-8"
	src="${path}/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8"
	src="${path}/ueditor/ueditor.all.min.js">
</script>
<script type="text/javascript">
	var ue = UE.getEditor('editor');
</script>
	<!--上面的导航条-->
	<div class="note_header">
		<!--LOGO-->
		<div
			style="float: right; height: 35px; padding: 6px 20px; width: 20%;">
			<img class="header_img" src="${path}/images/user_w.png"
				id="img_fastdoor" />
			<ul class="box_fastdoor">
				<li><a href="${path}/ShowMainPageByUser">主页</a></li>
				<li><a href="${path}/ShowBrief4BlogQuesController">广场</a></li>
				<li><a href="${path}/ShowJobControllerByUser">招聘</a></li>
				<li><a href="${path}/ShowNewsControllerByUser">新闻</a></li>
			</ul>
			<a href="javascript:void(0);" onclick="logout();"><img class="header_img"
				src="${path}/images/logout_w.png" /></a>
		</div>
		<div style="width: 40%; height: 47px; margin: 5px;">
			<img src="${path}/images/logo_w.png" />
		</div>



	</div>
	<!--Body-->
	<div style="width: 100%; height: auto; padding-top: 48px;">
		<div class="note_body center-block">

			<div class="sub_title">
				<h1 style="color: #3280FC; padding-top: 5px;">求知广场—问题大厅</h1>
			</div>


			<div
				style="width: 100%; border-bottom: #666 2px solid; height: 35px;">

				<h2 style="color: #3280FC; padding-top: 5px;">
					<a href="${path}/ShowMoreQuestionController"><i class="f_right"
						style="font-size: 15px;">Back</i></a>
				</h2>
			</div>
			<!--main middle body-->
			<div style="width: 100%; height: auto;">
				<div class="box_right"
					style="width: 100%; border-left: none; box-shadow: none">

					<table width="100%" class="table_ques">
						<tr>
							<td width="20%" style="border-right:1px solid #ccc;"><img class="user_img center-block"
								src="${path}/images/userimg.jpg"><br/>
								<div style="padding-left: 15px;">提问人:${question.author}</div></td>
							<td>
								<div class="notebook_content center-block">
									<h3>标题：${question.title}</h3>
									<span style="font-size:8px;float:right;"><fmt:formatDate value="${question.time}"
											pattern="yyyy-MM-dd HH:mm:ss" /></span> <br /> <br />${question.content}
								</div>
							</td>
						</tr>

						<c:choose>
							<c:when test="${list==null}">
								<tr>
									<td>还没有人回复哦！</td>
								</tr>
							</c:when>
							<c:otherwise>
								<c:forEach var="quesReply" items="${list}">
									<tr>
										<td style="border-right:1px solid #ccc;"><img class="user_img center-block"
											src="/qiuzhi/images/userimg.jpg">
											<div style="padding-left: 15px;">回复:${quesReply.replier}</div></td>
										<td><div class="notebook_content center-block">
												${quesReply.content}</div></td>
									</tr>
								</c:forEach>

							</c:otherwise>
						</c:choose>

						<tr>
						<td colspan="2">
								<form action="${path}/AddQuesReplyController" method="post">
									<br /> <input type="hidden" name="quesId"
										value="${question.quesId}" /> 
										<input type="hidden" name="replier" value="${sessionScope.user.username}" />
									<script id="editor" name="content" type="text/plain"
										style="width: 89%; height: 200px;margin-left:180px;"></script>
									<br /> <br /> <input type="submit" value="Reply"
										class="btn btn-primary" style="float:right;">
								</form>
							</td>
						</tr>
					</table>
					<!-- pager End here -->
				</div>
			</div>
			<!--Body center div end blow-->
			<!--FOOT -->
			<div class="user_foot">Copyrights(C)1997-2014 求知无限有限公司 Thirsty
				for Knowledge Co.Ltd 版权所有 不得转载</div>
			<!--FOOT END-->
	<script type="text/javascript">
				//注销
				function logout() {
					$.post("/qiuzhi/LogoutController", function(data) {
						if (data == "1") {
							alert("注销成功");
							window.location.href = "/qiuzhi/index.html";
						}
					});
				}
				</script>
		</div>
	</div>
</BODY>
</html>
